package com.helpustotravel.servlet;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.helpustotravel.core.ServletBase;
import com.helpustotravel.model.dao.HelpDAO;

@SuppressWarnings("serial")
public class UpdateHelpInfosServlet extends ServletBase {

	public static String NAME = "UpdateHelpInfos";
	
	protected HttpServletResponse doTache(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		
		String session = req.getParameter("session");
		String prenom = req.getParameter("prenom");
		String email = req.getParameter("email");
		String comment = req.getParameter("comment");
		
		HelpDAO helpDao = new HelpDAO(pm);
		helpDao.updateHelpInfos(session, prenom, email, comment);
		
		resp.getWriter().println("ok");
		
		return resp;
	}
}
